package com.lmx.repoDomain.repository;

import io.katharsis.queryParams.QueryParams;
import io.katharsis.repository.annotations.JsonApiResourceRepository;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.lmx.persistence.service.PersonLocationReportService;
import com.lmx.repoDomain.tmodel.PersonLocationReport;

@JsonApiResourceRepository(value = PersonLocationReport.class)
@Component
public class PersonLocationReportRepository extends
		BaseRepository<PersonLocationReport> {

	@Autowired
	PersonLocationReportService srv;

	@PostConstruct
	public void init() {
		super.dslJpaService.setEntityClass(PersonLocationReport.class);
	}

	@Override
	public Iterable<PersonLocationReport> findAll(
			final QueryParams requestParams) {
		return this.srv.page(requestParams);
	}
}
